<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>广电服务</title>
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">

	<link rel="stylesheet" href="../css/mui.min.css">
	<link rel="stylesheet" type="text/css" href="../css/icons-extra.css" />
	<link rel="stylesheet" type="text/css" href="../css/mui.picker.min.css" />
	<script src="../js/flexible.js" type="text/javascript" charset="utf-8"></script>

	<style>
		html,
		body {
			background-color: #fff;
		}

		ul,
		ol {
			list-style: none;
		}

		body input[type='text'],
		ul,
		li {
			padding: 0;
			margin: 0;
		}

		.clear {
			clear: both;
			height: 0;
			font-size: 0;
			line-height: 0;
			visibility: hidden;
			overflow: hidden;
		}
		/*顶部*/

		.mui-content {
			background: #fff;
		}

		.mui-control-content .mui-loading {
			margin-top: 44px;
		}

		#sliderSegmentedControl {}

		.mui-scroll,
		.mui-scroll-wrapper {}

		.mui-slider-group {
			margin-top: 2.612rem;
		}

		.gd_nav {
			position: fixed;
			left: 0;
			top: 44px;
			height: 1.306rem;
			z-index: 99;
			background: #fff;
			color: #888888;
			border-bottom: 1px solid #c5c5c5;
		}

		#slider .gd_nav a {
			font-size: 0.453rem;
			line-height: 1.306rem;
		}

		.gd_nav #sliderSegmentedControl .mui-active {
			color: #1c83fc;
		}

		.tabs {
			padding: 0 0.4rem;
			width: 100%;
			height: 1.28rem;
			background: #fff;
			position: absolute;
			top: 1.28rem;
			left: 0;
			z-index: 99;
			right: 0;
			display: flex;
			align-items: center;
			border-bottom: 1px solid #C5C5C5;
		}

		.tab {
			padding: 0 0.4rem;
			width: 100%;
			height: 1.28rem;
			background: #fff;
			line-height: 1.28rem;
		}

		.tab span {
			height: 0.826rem;
			line-height: 0.826rem;
			font-size: 0.373rem;
			color: #353535;
			background: #f5f5f5;
			display: inline-block;
			padding: 0 0.4rem;
			border-radius: 0.1rem;
			margin-right: 0.4rem;
		}

		.tab .active {
			color: #fff;
			background: #1c83fc;
		}
		/*列表*/

		.gd_list {
			background: #fff;
		}

		.gd_list li a {
			padding: 0.4rem;
			display: flex;
			justify-content: space-between;
			border-bottom: 1px solid #C5C5C5;
		}

		.gd_list li .l {
			width: 3.173rem;
			height: 1.973rem;
		}

		.gd_list li .l img {
			width: 100%;
			height: 100%;
			display: block;
			border-radius: 0.1rem;
		}

		.gd_list li .r {
			width: 5.666rem;
			height: 1.973rem;
		}

		.gd_list li .r p {
			margin: 0;
			color: #353535;
		}

		.gd_list li .r .t {
			font-size: 0.373rem;
			font-weight: bold;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 1;
			overflow: hidden;
		}

		.gd_list li .r .t1 {
			line-height: normal;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 2;
			overflow: hidden;
			font-size: 0.293rem;
			color: #888888;
			height: 0.92rem;
		}

		.gd_list li .r .bottom p {
			font-size: 0.293rem;
			display: inline-block;
		}

		.gd_list li .r .bottom .ll {
			float: left;
		}

		.gd_list li .r .bottom .rr {
			float: right;
			display: flex;
			align-items: center;
		}

		.gd_list li .r .bottom span {
			color: #353535;
		}

		.gd_list li .r .bottom .browse {
			margin-left: 0.266rem;
			display: flex;
			align-items: center;
		}

		.gd_list li .r .bottom .browse i {
			width: 0.32rem;
			height: 0.23rem;
			background: url(../images/gd_browse_icon.png) no-repeat;
			background-size: 100% 100%;
			display: inline-block;
			margin-right: 0.08rem;
		}

		.gd_list li .r .bottom .rr i {
			font-size: 0.35rem;
			color: #1d83fc;
		}

		#slider {
			background: #fff;
			overflow: visible;
		}

		#sliders {
			background: #fff;
			overflow: visible;
		}

		.mui-slider-indicator.mui-segmented-control {
			border-bottom: 1px solid #c5c5c5;
			height: 1.38rem;
		}

		.mui-scroll {
			height: 1.28rem;
		}

		#slider .top_nav {
			text-align: left;
			white-space: nowrap;
			position: absolute;
			top: 0px;
			left: 0;
			background: #fff;
			color: #888888;
			z-index: 10;
			height: 1.28rem;
			display: flex;
		}

		.top_nav span {
			display: inline-block;
			line-height: 1.28rem;
			margin: 0 0.4rem;
		}

		.top_nav .active {
			color: #1c83fc;
			border-bottom: 4px solid #1c83fc;
		}
		/*内容*/

		.con {}

		.mui-grid-view.mui-grid-9 {
			background: #fff;
		}
		/*表单*/

		.mk_form {
			width: 9.2rem;
			margin: 0 auto;
			padding: 0 0.266rem;
			background: #fff;
			border-radius: 0.13rem;
			margin-top: 0.533rem;
		}

		.mk_form form {
			display: inline-block;
		}

		.mk_form p {
			margin-top: 0.506rem;
			margin-bottom: 0;
		}

		.mk_form input[type='text'] {
			height: 0.826rem;
			text-indent: 0.2rem;
		}

		.mk_form label {
			color: #353535;
			font-size: 0.453rem;
		}

		.mk_form input[type='submit'] {
			width: 100%;
			height: 1.253rem;
			font-size: 0.453rem;
			background: #000;
			border-color: #000;
			margin: 0.933rem 0 1.306rem 0;
		}

		.deader_nav {}
		/*视频列表*/

		.clear {
			clear: both;
			height: 0;
			font-size: 0;
			line-height: 0;
			visibility: hidden;
			overflow: hidden;
		}
		/*顶部*/

		.bd_top_s_img {
			height: 4.666rem;
		}

		.bd_top_s_img img {
			height: 100%;
			width: 100%;
			border-radius: 0.1rem;
		}

		.bd_shipin_top {
			padding: 0.533rem 0.4rem 0;
		}

		.bd_shipin {
			background: #FFFFFF;
		}

		.top_s_zi_h3 {
			font-size: 0.373rem;
			color: #353535;
			margin-top: 0.3rem;
		}

		.top_s_zi_time {
			color: #6a6a6a;
			font-size: 0.293rem;
		}

		.top_s_zi_all {
			display: flex;
			justify-content: space-between;
			align-items: center;
		}

		.top_s_zi_sc img {
			height: 0.4rem;
			width: 0.45rem;
		}

		.top_s_zi_sc {
			display: flex;
			align-items: center;
			color: #6a6a6a;
			font-size: 0.293rem;
		}

		.top_s_zi_sc span {
			color: #6a6a6a;
		}

		.top_s_zi_sc i {
			font-size: 0.3rem;
		}

		.bd_shipin_ul {
			border-top: 1px solid #f4f4f4;
			margin-top: 0.266rem;
			padding: 0 0.4rem;
		}

		.bd_shipin_li {
			border-bottom: 1px solid #f4f4f4;
			padding: 0.4rem 0;
			display: flex;
		}

		.bd_shipin_li_img {
			height: 2.1rem;
			width: 3.373rem;
			margin: 0 0.1rem;
		}

		.bd_shipin_li_img img {
			height: 100%;
			width: 100%
		}

		.bd_shipin_li_h3 {
			font-size: 0.416rem;
		}

		.bd_shipin_li_con {
			padding-left: 0.466rem;
			box-sizing: border-box;
			width: 5.84rem;
		}

		.bd_shipin_li_p {
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}

		.query_box {
			width: 9.2rem;
			height: 5.333rem;
			box-shadow: 0 0 0.16rem #ccc;
			margin-left: 0.4rem;
			margin-top: 0.4rem;
			padding-top: 0.5333rem;
		}

		.line {
			overflow: hidden;
		}

		.line .address {
			width: 3.333rem;
			height: 1.2rem;
			float: left;
			border-bottom: 1px solid #dcdcdc;
			text-align: center;
			line-height: 1.2rem;
		}

		.line .icon {
			width: 1.2rem;
			height: 1.2rem;
			float: left;
		}

		.line .icon img {
			width: 80%;
			margin-left: 10%;
		}

		.input_line {
			border-bottom: 1px solid #dcdcdc;
			width: 7.85rem;
			margin-left: 0.6rem;
			line-height: 1.2rem;
		}

		.input_line span {
			padding-left: 0.6rem;
			font-size: 0.34rem;
		}

		.query_btn {
			width: 7.85rem;
			margin-left: 0.6rem;
			margin-top: 0.6rem;
			border-color: #1C83FC;
			color: #1C83FC;
		}
	</style>
</head>

<body>
	<div id="app">
		<!--顶部-->
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">{{title}}</h1>
		</header>
		<div class="mui-content">
			<div class="deader_nav">
				<div id="slider" class="mui-slider">
					<div class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
						<div class="mui-scroll top_nav">

							<span v-for="(item,i) in nav_list" :data-id="item.ptid" @click="nav_class(i)" :class="item.styles" v-html="item.name"></span>

						</div>
					</div>
				</div>
				<div id="slider" class="mui-slider" v-show="conclass!=1">
					<div class="mui-scroll-wrapper mui-scroll-wrappers mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
						<div class="tab mui-scroll">
							<span v-for="(item,i) in nav_list_two" class="nav_two" :data-id="item.ptid" @click="nav_class_two(i)" :class="item.styles"
							    v-html="item.name"></span>
						</div>

					</div>
				</div>
			</div>
			<div class="con">
				
				<!--火车查询-->
				<div class="query_box" id="" v-if="query_type == 'train'&&conclass==9">
					<div class="line">
						<div class="address" @click="select_start" style="margin-left: 0.6rem" v-html="start_city"></div>
						<div class="icon" @click="change_lane">
							<img src="../images/query/hc.png" />
						</div>
						<div class="address" @click="select_end" v-html="end_city"></div>

					</div>

					<div class="line input_line" @click="select_date">
						<span v-html="query_date"></span>

					</div>
					<div class="mui-btn query_btn " @click="query_fun">查询</div>
				</div>
				
				<!--飞机查询-->
				<div class="query_box" id="" v-if="query_type == 'air' &&conclass==9 ">
					<div class="line">
						<div class="address" @click="select_start" style="margin-left: 0.6rem" v-html="start_city"></div>
						<div class="icon" @click="change_lane">
							<img src="../images/query/fj.png" />
						</div>
						<div class="address" @click="select_end" v-html="end_city"></div>

					</div>

					<div class="line input_line" @click="select_date">
						<span v-html="query_date"></span>

					</div>
					<div class="mui-btn query_btn " @click="query_fun">查询时刻票价</div>
				</div>
				
				<!--飞机查询-->
				<div class="query_box" id="" v-if="query_type == 'air' &&conclass==9">
					<div class="line">
						<div class="address" @click="select_start" style="margin-left: 0.6rem" v-html="start_city"></div>
						<div class="icon" @click="change_lane">
							<img src="../images/query/fj.png" />
						</div>
						<div class="address" @click="select_end" v-html="end_city"></div>

					</div>

					<div class="line input_line" >
						<input type="text" name="" id="" v-model="air_num" placeholder="请输入正确的航班号" style="border: none;font-size: 0.36rem;"/>

					</div>
					<div class="mui-btn query_btn " @click="query_fun">查询起降时间</div>
				</div>
				
				

				<ul class="mui-table-view gd_list" v-if='conclass==0'>
					<li v-for="(item,i) in list_con">
						<a @tap="go_page('xiangqing.html?id='+item.id+'&type='+conclass+'&status='+item.status+'&types=1')" >
							<div class="l">
								<img :src="item.pic" />
							</div>
							<div class="r">
								<p class="t" v-html="item.name"></p>
								<p class="t1" v-html="item.brief"></p>
								<div class="bottom">
									<p class="ll time" v-html="item.createtime"></p>
									<p class="ll browse">
										<i></i>
										<span v-html="item.scan"></span>
									</p>
									<p class="rr">
										<i :class="item.no" @click="like(i)"></i>
										<span>{{item.collectnum}}人收藏</span>
									</p>
								</div>

							</div>
						</a>
					</li>
					<!--<li>
					<div class="l">
						<img src="../images/cbd.jpg"/>
					</div>
					<div class="r">
						<p class="t">数字电视、有线电视开户</p>
						<p class="t1"></p>
						<p class="t2">2018-10-10</p>
					</div>
				</li>-->
				</ul>
				<ul class="mui-table-view mui-grid-view mui-grid-9" v-if='conclass==1'>
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
						<a href="query_weather.html">
							<img src="../images/query/model_icon/2.png" style="width: 100%;"/>
							<div class="mui-media-body">天气查询</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
						<a href="query_break.html">
							<img src="../images/query/model_icon/1.png"  style="width: 100%;"/>
							<div class="mui-media-body">违章查询</div>
						</a>
					</li>
					<!-- <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
						<a href="#">
							<img src="../images/mk_3.png" />
							<div class="mui-media-body">天然气</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
						<a href="#">
							<img src="../images/mk_4.png" />
							<div class="mui-media-body">有线电视费</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
						<a href="#">
							<img src="../images/mk_5.png" />
							<div class="mui-media-body">物业费</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
						<a href="#">
							<img src="../images/mk_6.png" />
							<div class="mui-media-body">车位费</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
						<a href="#">
							<img src="../images/mk_7.png" />
							<div class="mui-media-body">手机费</div>
						</a>
					</li> -->
				</ul>
				<!--<div class="mk_form" v-if='conclass==2'>
				<form action="" method="post">
					<p>
						<label>申报名称：</label>
						<input type="text" name="" id="" value="" />
					</p>
					<p>
						<label>申报名称：</label>
						<input type="text" name="" id="" value="" />
					</p>
					<p>
						<label>申报名称：</label>
						<input type="text" name="" id="" value="" />
					</p>
					<input type="submit" value="提交申报"/>
				</form>
			</div>-->
				<div class="bd_shipin" v-if='conclass==3'>
					<div class="bd_shipin_top" v-for="(item,i) in list_con">
						<a :href="'dj_shipinxq.html?id='+item.id+'&type='+conclass">
							<div class="bd_shipin_top_s">
								<div class="bd_top_s_img">
									<img :src="item.img">
								</div>
								<div class="top_s_zi">
									<h3 class="top_s_zi_h3">{{item.name}}</h3>
									<div class="top_s_zi_all">
										<div class="top_s_zi_time">视频时长：{{item.long}}</div>
										<div class="top_s_zi_sc">
											<i class="mui-icon-extra mui-icon-extra-heart" @click="like(i)"></i>
											<span>{{item.collectnum}}人收藏</span>
										</div>
									</div>
								</div>
							</div>
						</a>
					</div>

				</div>
			</div>

		</div>
	</div>
	<div id="footer"></div>

</body>
<script src="../js/mui.min.js"></script>
<script src="../js/js.js"></script>
<script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/mui.picker.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/city.data-3.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/tools/query_city.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript" charset="utf-8">
	var address = Storage.get('address');
	var User = Storage.get('user');
	var href = location.href;
	var tid = href.split("=")[1].split("&");
	var name = href.split("=")[2];

	var start_address_picker = new mui.PopPicker({
		layer: 2
	});
	var end_address_picker = new mui.PopPicker({
		layer: 2
	});
	var date_picker = new mui.DtPicker({
		type: 'date'
	});
	var vue = new Vue({
		el: '#app',
		data: {
			title: '',
			nav_list: [],
			nav_list_two: [

			],
			conclass: '',
			list_con: [],
			start_city: '请选择',
			end_city: '请选择',
			query_date: '请输入查询日期',
			query_type : null,   // train 火车查询  air 飞机查询
			air_num:'',//航班号
		},
		methods: {
			//点赞
			/*
			like: function(i) {
				console.log(vue.list_con[i].no, '///')
				mui.get(url + "api/article/modelCollect", {
					uid: tid[0],
					type: vue.conclass,
					vid: vue.list_con[i].id,
					sqid: '6'
				}, function(data) {
					console.log(data)
					if(data == 1) {
						vue.list_con[i].no = 'mui-icon-extra mui-icon-extra-heart-filled'
						mui.toast('点赞成功', {
							duration: 'long',
							type: 'div'
						})
					} else {
						vue.list_con[i].no = 'mui-icon-extra mui-icon-extra-heart'
						mui.toast('点赞取消', {
							duration: 'long',
							type: 'div'
						})
					}
					console.log(vue.list_con[i].no, '----')
				}, 'json');

				this.classe = 'mui-icon-extra mui-icon-extra-heart-filled'
				console.log(this.class)
			},
			*/
			//二级分类请求数据
			nav_class: function (i) {

				var list = vue.nav_list;
				mui.each(list, function (o, v) {
					v.styles = ''
				})

				list[i].styles = 'active';

				if (list[i].name == "便民查询") {
					console.log(list[i])
					//点击了便民查询	
					console.log("----便民查询-----")
					vue.conclass = vue.nav_list[i].type;

					return
				}

				if (list[i].sub.length != 0) {
					vue.nav_list_two = list[i].sub
					mui.each(vue.nav_list_two, function (o, v) {
						v.styles = ''
					})
					if (list[i].name == "轻松出行") {
						//点击了轻松出行
						console.log("----轻松出行-----")
						vue.conclass = 9;
						vue.query_type = 'train'
						console.log(vue.nav_list[i])
						vue.nav_list[i].sub[0].styles = "nav_two active"
						return
					}
					mui.get(url + "api/article/getList/", {
						id: address.sqid,
						bid: address.bid,
						uid: User ? User.uid : 0,
						cat1: tid[0],
						cat2: vue.nav_list[i].ptid,
						cat3: vue.nav_list_two[0].ptid,
						type: vue.nav_list_two[0].type
					}, function (data) {
						if (data) {
							var json = JSON.parse(data).data;
							if (json == '' || json == null) {
								vue.list_con = []
								mui.toast('暂无数据', {
									duration: 'long',
									type: 'div'
								})
								return false;
							}
							var list_con = []
							if (json.length != 0) {
								mui.each(json, function (key, value) {
									if (value.status == 0) {
										value.no = 'mui-icon-extra mui-icon-extra-heart'
									} else {
										value.no = 'mui-icon-extra mui-icon-extra-heart-filled'
									}

									list_con.push(value)
								})
								vue.list_con = list_con
								vue.conclass = vue.nav_list_two[0].type;
							} else {
								vue.list_con = []
							}

							//console.log(vue.conclass)
						}
					}, 'json');
					vue.nav_list_two[0].styles = 'active',
						console.log(vue.nav_list_two)
				} else {
					vue.nav_list_two = []
				}

			},
			//三级级分类请求数据

			nav_class_two: function (i) {
				
				var list = vue.nav_list_two;
				
			 	mui.each(list, function (o, v) {
					v.styles = ''
				})
				if(JSON.stringify(list[i].ptid) == '426'){
					list[i].styles = 'active';
					vue.query_type = 'train'
					return
				}
			 	if(JSON.stringify(list[i].ptid) == '425'){
				 	list[i].styles = 'active';
					vue.query_type = 'air'
					return
				}
				
				list[i].styles = 'active';
				mui.get(url + "api/article/getList/", {
					id: address.sqid,
					bid: address.bid,
					uid: User ? User.uid : 0,
					cat1: tid[0],
					cat2: vue.nav_list_two[i].pid,
					cat3: vue.nav_list_two[i].ptid,
					type: vue.nav_list_two[i].type
				}, function (data) {
					if (data) {
						//							console.log(data)
						var json = JSON.parse(data).data;
						if (json == '' || json == null) {
							vue.list_con = []
							mui.toast('暂无数据', {
								duration: 'long',
								type: 'div'
							})
							return false;
						}
						console.log(json)
						var list_con = []
						if (json.length != 0) {
							mui.each(json, function (key, value) {
								//value.createtime = format(value.createtime)
								if (value.status == 0) {
									value.no = 'mui-icon-extra mui-icon-extra-heart'
								} else {
									value.no = 'mui-icon-extra mui-icon-extra-heart-filled'
								}
								//						        	mui.get(url+"api/article/modelCollect",{
								//				              		uid:tid[0],type:vue.conclass,vid:json[0].id
								//					              	},function(data){
								//					              		if (data == 1) {
								//					              			value.no = 'mui-icon-extra mui-icon-extra-heart-filled'
								//					              		}else{
								//					              			value.no = 'mui-icon-extra mui-icon-extra-heart'
								//					              		}
								//					            	},'json');
								list_con.push(value)
							})
							vue.list_con = list_con
							vue.conclass = vue.nav_list_two[i].type;
						} else {
							vue.list_con = []
						}

						//console.log(vue.conclass)
					}
				}, 'json');
			},
			//选择起点
			select_start: function () {
				var that = this
				start_address_picker.show(function (SelectedItem) {
					//console.log(SelectedItem);
					//console.log(SelectedItem[1].text);
					that.start_city = SelectedItem[1].text;
					that.start_city_code = getThreeWordByCity(that.start_city.replace("市",""))
					
				})
			},
			//选择终点
			select_end: function () {
				var that = this
				end_address_picker.show(function (SelectedItem) {
					console.log(SelectedItem);
					that.end_city = SelectedItem[1].text
					that.end_city_code = getThreeWordByCity(that.end_city.replace("市",""))
				})
			},
			//切换 往返
			change_lane: function () {
				
				var address = this.end_city;
				this.end_city = this.start_city;
				this.start_city = address;
				
				var code = this.end_city_code;
				this.end_city_code = this.start_city_code;
				this.start_city_code = code;

			},
			go_page:function(link){
				mui.openWindow(link,link)
			},
			//查询
			query_fun: function() {
					console.log(this.start_city_code)
					console.log(this.end_city_code)
					console.log(this.query_date)
			 
					if(!this.start_city_code||!this.end_city_code){
						mui.toast("请完善查询信息");
						return
					}
					
					
					if(this.query_type == 'air') {
						// 查询航班
						if(this.air_num){
							//航班号存在 查询 具体 起落时间
							var data = {
								dtype: 'json',
								orgCity: this.start_city.replace("市",""), //	始发城市的三字码
								dstCity: this.end_city.replace("市",""), //到达城市的三字码
//								flightDate: this.query_date, //	日期（年月日）
								airline: 'ALL', //航空公司的两字码或者"ALL"或者""
								direct: true, //直航/转飞
								eticket: false, //是否必须是电子票
								flightNo:this.air_num //航班号
								
							}
							localStorage.setItem("query_air_num_data", JSON.stringify(data));
							mui.openWindow({
								url: 'query_air_num_res.html',
								id: 'query_air_num_res.html'
							})
						}else{
							//航班号不存在 查询 时刻机票价
							var data = {
								dtype: 'json',
								orgCity: this.start_city.replace("市",""), //	始发城市的三字码
								dstCity: this.end_city.replace("市",""), //到达城市的三字码
								flightDate: this.query_date, //	日期（年月日）
								airline: 'ALL', //航空公司的两字码或者"ALL"或者""
								direct: true, //直航/转飞
								eticket: false, //是否必须是电子票
							}
							localStorage.setItem("query_air_data", JSON.stringify(data))
	
							mui.openWindow({
								url: 'query_air_res.html',
								id: 'query_air_res.html'
							})
						}
						
					} else if(this.query_type == 'train') {
						//查询火车
						var data = {
							dtype: 'json',
							start: this.start_city.replace("市",""), //	始发城市的三字码
							end: this.end_city.replace("市",""), //到达城市的三字码
							date: this.query_date, //	日期（年月日）
							 
						}
						localStorage.setItem("query_train_data", JSON.stringify(data))
						mui.openWindow({
							url: 'query_train_res.html',
							id: 'query_train_res.html'
						})
					}
					

				},
				select_date: function() {
					var that = this;
					date_picker.show(function(selectItems) {
								console.log(selectItems.y);//{text: "2016",value: 2016} 
					console.log(selectItems.m); //{text: "05",value: "05"} 
					console.log(selectItems.d); //{text: "05",value: "05"} 
					var d = selectItems.y.text + "-" + selectItems.m.text + "-" + selectItems.d.text
					that.query_date = d;
				})
			},
			
		 
		},
		created: function () {
			data_init()

		},
		mounted: function () {
			mui_init()

			city_pick_init()
		}
	})

	function data_init() {

		//页面加载 默认第一条数据
		//获取二级三级分类

		mui.get(url + "api/article/getLists/tid/" + tid, {}, function (data) {
			var json = JSON.parse(data).data;
			console.log(json)
			vue.title = json.name

			mui.each(json.sub, function (key, value) {
				vue.nav_list.push(value)
				console.log(value)
			});
			if (tid[0] == 130) {
				vue.nav_list.push({
					name: '便民查询',
					type: 1,
					sub: {
						name: ''

					}
				})
			}

			vue.nav_list[0].styles = 'active';
			if (vue.nav_list[0].sub.length != 0) {
				vue.nav_list_two = vue.nav_list[0].sub;
				vue.nav_list_two[0].styles = 'active';
				mui.get(url + "api/article/getList/", {
					id: address.sqid,
					bid: address.bid,
					uid: User ? User.uid : 0,
					cat1: tid[0],
					cat2: vue.nav_list[0].ptid,
					cat3: vue.nav_list_two[0].ptid,
					type: vue.nav_list_two[0].type
				}, function (data) {
					if (data) {
						//console.log(data)
						var json = JSON.parse(data).data;
						if (json == '' || json == null) {
							vue.list_con = []
							mui.toast('暂无数据', {
								duration: 'long',
								type: 'div'
							})
							return false;
						}
						console.log(json)
						var list_con = []
						mui.each(json, function (key, value) {
							mui.each(json, function (key, value) {
								if (value.status == 0) {
									value.no = 'mui-icon-extra mui-icon-extra-heart'
								} else {
									value.no = 'mui-icon-extra mui-icon-extra-heart-filled'
								}
							})
							list_con.push(value)
						})
						vue.list_con = list_con
						vue.conclass = vue.nav_list_two[0].type;
					}
				}, 'json');
				//		
			}
		}, 'json');

		

		//整数
		function add0(m) {
			return m < 10 ? '0' + m : m
		}
		//转换时间戳
		function format(shijianchuo) {
			//shijianchuo是整数，否则要parseInt转换
			var time = new Date(shijianchuo * 1000);
			var y = time.getFullYear();
			var m = time.getMonth() + 1;
			var d = time.getDate();
			var h = time.getHours();
			var mm = time.getMinutes();
			var s = time.getSeconds();
			return y + '-' + add0(m) + '-' + add0(d);
		}

	}

	function mui_init() {
		//mui初始化
		mui.init({
			swipeBack: false
		});
		
		var options = {
			scrollY: false, //是否竖向滚动
			scrollX: true, //是否横向滚动
			startX: 0, //初始化时滚动至x
			startY: 0, //初始化时滚动至y
			indicators: false, //是否显示滚动条
			deceleration: 0.0006, //阻尼系数,系数越小滑动越灵敏
			bounce: true //是否启用回弹
		}
		mui('.mui-scroll-wrapper').scroll(options);
		mui('.mui-scroll-wrappers').scroll(options);
	}

	function city_pick_init() {

		start_address_picker.setData(cityData3);
		end_address_picker.setData(cityData3);
	}
</script>

</html>
